﻿using System;
using System.Net;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using ESRI.ArcGIS.Client;
using System.Collections.Generic;

namespace Eaglight.Extentions
{
    public static class LayerInfoExtensions
    {
        public static bool IsVisible(this LayerInfo layerInfo, ArcGISDynamicMapServiceLayer lyr)
        {
           List<int> visibleLayers = lyr.VisibleLayers.ToList<int>();
           var x = from v in visibleLayers where (v == layerInfo.ID) select v;
           return (x != null);
        }
    }
}
